package com.jihui.enterprise.dao.impl;

import com.jihui.enterprise.model.JihuiEnterprise;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.mapping.StatementType;


public interface EnterpriseMapper {

    @Insert("insert into jihui_enterprise(user_id , name) values (#{enterprise.userId},#{enterprise.name})")
    @SelectKey(before = false, keyProperty = "enterprise.id", resultType = Long.class, statementType = StatementType.STATEMENT, statement = "SELECT LAST_INSERT_ID() AS id")
    void save(@Param("enterprise") JihuiEnterprise enterprise);

}